Skip to content

Don't preselect another ticket's upload place for a project without its own - #382

Merged
morepriyam merged 1 commit into
mainfrom
fix/352-no-foreign-place-preselect
Dec 3, 2026
Merged

morepriyam merged 1 commit into
mainfrom
fix/352-no-foreign-place-preselect

Conversation

@morepriyam

Copy link
Copy Markdown
Collaborator

Part of #335. Fixes #352 (part 1, F13).

Problem. On Export, a project without its own place (a Duplicate, a Blank project or an imported .pulse) preselected the newest destination, even when that was another ticket's place link. One tap on Upload sent the project to that ticket and spent its single-use link. Reproduced on 2.9.2 on the iOS Simulator and a Pixel 6a (results in #335).

Change. uploadChoice() preselects, for a project without its own place, only the newest destination that is not a place (a server paired without a ticket ref), otherwise nothing.

  • Places stay listed and can be picked.
  • A project with its own place is unchanged.
  • With nothing preselected, Export shows "Choose where to upload this project." and Upload waits for a pick.
  • The embed doesn't use this path.

Files: upload-choice.ts (the rule), export-screen.tsx and primary-action.ts (the prompt line), pool-targets.tsx (comment), upload-choice.test.ts (two cases), README.md.

Checks: tsc, lint, Prettier, full Jest suite (2,801 passed). Device: pending (a Pixel or S24 run will be added in a comment).

Not changed: #352 parts 2 and 3 (F14 renewed links, F24) remain open product decisions.

Phone flow: changes the Export screen's upload choice. No new controls; the prompt is a footnote above the existing destination list.

…ut one (#352)

A Blank project, a Duplicate or an imported .pulse now preselects only the
newest destination that isn't a place, else nothing. Export then says
"Choose where to upload this project." and Upload waits for a pick.
Copilot AI balanced review requested due to automatic review settings December 3, 2026 18:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Native Export still needs on-device iOS/Android validation of destination selection, disabled Upload behavior, and reachability with either hand and large text; source inspection and Jest checks cannot establish these behaviors.

No open issues 🎉

What changed in this PR

Addresses #352’s F13 by preventing projects without their own place from automatically selecting another ticket’s upload link.

Changes:

  • Preselects only the newest non-place destination; places remain manually selectable.
  • Adds an Export prompt when a destination must be chosen.
  • Adds regression tests and documents the behavior.
File Description
src/​features/​upload/​pairing/​upload-choice.ts Restricts automatic destination selection.
src/​features/​upload/​pairing/​upload-choice.test.ts Tests mixed and place-only destination pools.
src/​features/​upload/​pairing/​pool-targets.tsx Updates the selection-rule comment.
src/​features/​export/​primary-action.ts Defines the destination prompt text.
src/​features/​export/​export-screen.tsx Displays the prompt when selection is needed.
README.md Documents the safer default.

Review effort: Balanced

@morepriyam

Copy link
Copy Markdown
Collaborator Author

Device check on a Pixel 6a (Android 17 beta): 2.9.2 (20952) with this PR's JS (2b1f9bd). Pass:

  • Ticket 101's own project still preselects Ticket 101.
  • A Duplicate of it, a Blank project and an imported .pulse preselect nothing; Export shows "Choose where to upload this project." and Upload stays off.
  • Picking a destination enables Upload.

Nothing was uploaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upload places: a draft without a place preselects another ticket's place; renewed links and Export after relaunch

2 participants